package com.android.love.ui;

import android.content.Intent;
import android.os.Bundle;
import android.webkit.CookieManager;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.webkit.WebSettings.ZoomDensity;

public class SimpleWebActivity extends BasePageActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		Intent intent = getCurrentIntent();
		if (intent == null)
			return;
		String path = intent.getStringExtra(PATH);
		WebView web = new WebView(context);
		WebSettings settings = web.getSettings();
		settings.setJavaScriptEnabled(true);
		settings.setLoadsImagesAutomatically(true);
		settings.setUseWideViewPort(true);
		settings.setLoadWithOverviewMode(false);
		settings.setSaveFormData(true);
		settings.setSavePassword(true);
		settings.setDefaultZoom(ZoomDensity.valueOf(ZoomDensity.MEDIUM
				.toString()));
		CookieManager.getInstance().setAcceptCookie(true);
		web.setWebChromeClient(new WebChromeClient());
		web.setWebViewClient(new WebViewClient());
		web.loadUrl(path);
	}
	@Override
	protected Boolean loadBottomTab() {
		// TODO Auto-generated method stub
		return false;
	}
}
